#ifndef QAUDIOREADER_H_0F6A17DA_343E_4C42_B3D8_EFA3BCA02834
#define QAUDIOREADER_H_0F6A17DA_343E_4C42_B3D8_EFA3BCA02834

#include "AudioUtils_global.h"

namespace AudioUtils {

class QAudioReaderPrivate;

class AUDIOUTILS_EXPORT QAudioReader
{
public:
    QAudioReader();
    ~QAudioReader();

public:
    bool open(const QString& path);
    void close();

    // SEEK_SET, SEEK_CUR and SEEK_END
    quint64	seek (quint64 frames, int whence);

    quint64 read (short *ptr, quint64 items);
    quint64 read (int *ptr, quint64 items);
    quint64 read (float *ptr, quint64 items);
    quint64 read (double *ptr, quint64 items);

    quint64 readf (short *ptr, quint64 frames);
    quint64 readf (int *ptr, quint64 frames);
    quint64 readf (float *ptr, quint64 frames);
    quint64 readf (double *ptr, quint64 frames);

	quint64 readTrack(short *ptr, quint64 frames, quint8 channel);
	quint64 readTrack(int *ptr, quint64 frames, quint8 channel);
	quint64 readTrack(float *ptr, quint64 frames, quint8 channel);
	quint64 readTrack(double *ptr, quint64 frames, quint8 channel);

private:
    QAudioReaderPrivate* p;
};

}

#endif // QAUDIOREADER_H_0F6A17DA_343E_4C42_B3D8_EFA3BCA02834
